module.exports = Behavior({
  data: {
    page: 1,
    loading: false,
    listData: [],
    noMore: false,
    isLoadMore: false,
    defPath:"/packageF/subscribe/"
  },
  methods: {
    initdata() {
      this.setData({
        page:1,
        listData:[],
        loading:false,
        isLoadMore:false,
        noMore:false
      })
    },
    setMore(bool) {
      this.setData({
        noMore:bool,
        isLoadMore:!bool
      })
    },
    goto({currentTarget:{dataset:{path}}}) {
      wx.navigateTo({
        url:this.data.defPath + path + "/" + path,
      })
    },
    onReachBottom(){
      if(this.data.noMore){
        return
      }
      this.getMoreData();
    },
  }
})